IF (HAVE_STL)
    INCLUDE (CheckCXXSourceCompiles)
    SET (CHECK_CXX_CODE "#include <sstream>\n#include <stdexcept>\n#include <vector>\nint main () { try { std::vector<int> myvector; myvector.resize(myvector.max_size() + 1); } catch (std::length_error & le) { std::ostringstream out; out<<(le.what())<<std::hex<<std::showbase<<(0x10); } return 0; }")
    CHECK_CXX_SOURCE_COMPILES ("${CHECK_CXX_CODE}" HAVE_COMPATIBLE_CXX)
    IF (HAVE_COMPATIBLE_CXX)
	PLAYERDRIVER_OPTION (epuck build_epuck ON)
    ELSE (HAVE_COMPATIBLE_CXX)
        PLAYERDRIVER_OPTION (epuck build_epuck OFF "Required C++ classes not found")
    ENDIF (HAVE_COMPATIBLE_CXX)
ELSE (HAVE_STL)
    PLAYERDRIVER_OPTION (epuck build_epuck OFF "STL not found")
ENDIF (HAVE_STL)

PLAYERDRIVER_REJECT_OS (epuck build_epuck PLAYER_OS_WIN)
PLAYERDRIVER_ADD_DRIVER (epuck build_epuck SOURCES epuckCamera.cpp epuckDriver.cpp epuckInterface.cpp epuckIR.cpp epuckLEDs.cpp epuckPosition2d.cpp serialPort.cpp)
